<template>
	<view style="width: 100%; height: 500px; ">
		 <u--form :model="informtion" ref="addaddressform"  class="demo-ruleForm" style="margin-top:48px;">
			<u-row>
				<u-col span=3><p style="float: left; line-height: 40px;margin-left: 10px;">金额：</p></u-col>
				<u-col span=9> <u--input
				style="width: 250px;  "
			    placeholder="请输入拍卖金额"
			    border="surround"
			    v-model="informtion.startPrice"
				></u--input></u-col>
			</u-row>
			<u-divider text=""></u-divider>
			<u-row>
				<u-col span=3><p style="float: left; line-height: 40px;margin-left: 10px;">开始时间：</p></u-col>
				<u-col span=9> <u--input
				style="width: 250px;  "
			    placeholder="请设置开始时间"
			    border="surround"
			    v-model="informtion.startTime"
				></u--input></u-col>
			</u-row> 
			<u-divider text=""></u-divider>
			<u-row>
				<u-col span=3><p style="float: left; line-height: 40px;margin-left: 10px;">结束时间：</p></u-col>
				<u-col span=9> <u--input
				style="width: 250px;  "
			    placeholder="结束时间"
			    border="surround"
			    v-model="informtion.endTime"
				></u--input></u-col>
			</u-row> 
			<u-divider text=""></u-divider>
		
			 <u-button class ="que" type="primary"  shape="circle" :plain="true"  @click="addForm('addaddressform')" style="width: 150px;margin-top: 50px; height: 45px;">添加收货地址</u-button>
			 </u--form> 
			 
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
					show: false,
					sjow: false,
					columnsys:[
							['学校', '家','公司'],
					],
						columns: [
							['中国', '美国'],
							['深圳', '厦门', '上海', '拉萨']
						],
						columnData: [
							['深圳', '厦门', '上海', '拉萨'],
							['得州', '华盛顿', '纽约', '阿拉斯加']
						],
					informtion:{
							id:"",
							startPrice:'', //金额
							startTime:'', //开始时间
							endTime:'', //结束时间
					},
			}
		},
		methods: {
			addForm(){
                var that = this
				uni.request({
						url: "http://"+that.$host+":"+that.$port+"/publish/publishUpdate",          
						method: 'POST',
						data: this.informtion,
						dataType: 'json',
						success: (res) => {
							if(res.data.object){
						uni.showToast({ //添加成功提示
								 icon: 'success',
								 title: '发布成功',
								 // 显示时长时间为1000秒
								 duration: 1000
								})
								this.timer = setInterval(function () { 
									location.reload()// 定时任务
								},1000) 
							}
						},
						});
			},
			onHide() { // 清除定时任务
			    clearInterval((this.timer));
			    this.timer = null;
			},
		}
	}
</script>

<style>

</style>
